package com.openarena.statistics;

import java.text.SimpleDateFormat;
import java.util.Date;

public class GamePeriod {

    private static final String dateFormat = "yyyy-MM-dd";
    private final String label;
    private final String value;

    public GamePeriod(String label, Date date) {
        this.label = label;
        this.value = getGamePeriodFormatter().format(date);
    }

    public String getLabel() {
        return label;
    }

    public String getValue() {
        return value;
    }

    public static SimpleDateFormat getGamePeriodFormatter() {
        return new SimpleDateFormat(dateFormat);
    }
}
